<head>
    <meta name="referrer" content="never">
</head>
<div ng-controller="ArticleCtrl" ng-init="listAction()">
    <ul class="sui-breadcrumb">
        <li><a href="#/article/list">图文信息</a></li>
        <li class="active"> {{'列表' | translate}}
        </li>
        <li class="active"> {{'选择公众号：' | translate}}
            <wx-app-list ng-model="wxappid" dft="1" ary="storeary" xc="1"> </wx-app-list>
        </li>
    </ul>
    <div>
        <wxgzh-tab ng-model="tabtype" click-tab="getlist(1)"></wxgzh-tab>
    </div>
    <div>
        <div>
            <!-- <h2> {{tabname}}</h2> -->
            <span class="sui-form sui-form pull-right" ng-show="tabtype=='news'"> 
	          <a href="#/article/add?wxappid={{wxappid}}" class="sui-btn btn-primary">+{{'新建图文消息'|translate}}</a>
	        </span>
        </div>
        <div>
            {{list}}
        </div>

        <table class="sui-table table-bordered">
            <thead>
                <tr>
                    <th>{{'主图'|translate}}</th>
                    <th>{{'名称/内容'|translate}}</th>
                    <th>{{'修改时间'|translate}}</th>
                    <th>{{'operation'|translate}}</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="list in itemlist">
                    <td ng-show="list.url">
                        <div style="margin:10px">
                            <img ng-src="{{list.url}}" style="width: 200px;height: 100px"></div>
                    </td>
                    <td ng-show="list.name">{{list.name}}</td>
                    <td ng-show="list.content">
                        <div style="margin:10px">
                            <img ng-src="{{list.content.news_item[0].thumb_url}}" style="width: 200px;height: 100px">
                        </div>
                    </td>
                    <td ng-show="list.content">
                        <div>{{list.content.news_item[0].title}}</div>
                        <div>{{list.content.news_item[0].author}}</div>
                    </td>
                    <td ng-show="list.update_time">
                        <div>{{getLocalTime(list.update_time)}}</div>
                    </td>
                    <td>
                        <a href="#/article/add?media_id={{list.media_id}}&wxappid={{wxappid}}" class="sui-btn btn-success" ng-show="tabtype =='news'">{{'edit'|translate}}</a>
                        <button type="button" class="sui-btn btn-danger" ng-click="delMedia(list.media_id)">{{'删除'|translate}}</button>
                    </td>
                </tr>
            </tbody>
        </table>
        <!-- 分页start -->
        <pager page-no="1" page-size="pageSize" total="total_count" get-data="getlist(pageNo,item_count)"></pager>
    </div>
</div>